package view;

import java.awt.BorderLayout; 

import java.awt.Dimension;
import java.util.ResourceBundle;
import javax.swing.JPanel;

/**
 * @author Andrea
 * 
 */

@SuppressWarnings("serial")
// Makes inner panel of each tab, which consists of a canvas (pixmap)
public class TabInnerPanel extends JPanel {
	private static ResourceBundle myViewSizes = ResourceBundle
			.getBundle("resources.viewSizes");

	private static Dimension DEFAULT_SIZE = new Dimension(Integer
			.parseInt(myViewSizes.getString("CanvasWidth")), Integer
			.parseInt(myViewSizes.getString("CanvasHeight")));

	public TabInnerPanel(Canvas current) {
		super(new BorderLayout());
		// Place the canvas inside tab
		current.setSize(DEFAULT_SIZE);
        setPreferredSize(DEFAULT_SIZE);
        setMinimumSize(DEFAULT_SIZE);
        super.setSize(DEFAULT_SIZE);
		add(current, BorderLayout.CENTER);
	}
}
